package com.neutech.maplestory.entity;

import com.neutech.maplestory.client.MapleStoryClient;
import com.neutech.maplestory.util.ImageUtil;

import java.awt.*;

public class Ground extends AbstractMapleStoryObject{
    public Image img;
    public Ground(){
    }
    public Ground(MapleStoryClient msc, int x, int y, int width, int height){
        this.msc = msc;
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;

//        this.img = ImageUtil.getImage("");
//        this.width = img.getWidth(null);
//        this.height = img.getHeight(null);
    }
    public Ground(MapleStoryClient msc, int x, int y, String key){
        this.msc = msc;
        this.x = x;
        this.y = y;

        this.img = ImageUtil.getImage(key);
        this.width = img.getWidth(null);
        this.height = img.getHeight(null);
    }
    @Override
    public void draw(Graphics g) {
        g.drawRect(x, y, width, height);
    }
    public void drawBackground(Graphics g) {
        g.drawImage(img,x,y,null);
    }
}
